home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / windows / games / wincapt.arj / ERRORS.C < prev    next >
C/C++ Source or Header  |  1992-06-25  |  1KB  |  50 lines

  1. //
  2. // Errors.c
  3. //
  4. // Contains error messages for DIBAPI.DLL
  5. //
  6. // These error messages all have constants associated with
  7. // them, contained in dibapi.h.
  8. //
  9. // Copyright (c) 1991 Microsoft Corporation. All rights reserved.
  10. //
  11.  
  12.  
  13. #include <windows.h>
  14. #include "dibapi.h"
  15.  
  16. static char *szErrors[] =
  17. {
  18.    "Not a Windows DIB file!",
  19.    "Couldn't allocate memory!",
  20.    "Error reading file!",
  21.    "Error locking memory!",
  22.    "Error opening file!",
  23.    "Error creating palette!",
  24.    "Error getting a DC!",
  25.    "Error creating Device Dependent Bitmap",
  26.    "StretchBlt() failed!",
  27.    "StretchDIBits() failed!",
  28.    "SetDIBitsToDevice() failed!",
  29.    "Printer: StartDoc failed!",
  30.    "Printing: GetModuleHandle() couldn't find GDI!",
  31.    "Printer: SetAbortProc failed!",
  32.    "Printer: StartPage failed!",
  33.    "Printer: NEWFRAME failed!",
  34.    "Printer: EndPage failed!",
  35.    "Printer: EndDoc failed!",
  36.    "SetDIBits() failed!",
  37.    "File Not Found!",
  38.    "Invalid Handle",
  39.    "General Error on call to DIB function"
  40. };
  41.  
  42.  
  43. void FAR DIBError(int ErrNo)
  44. {
  45.    if ((ErrNo < ERR_MIN) || (ErrNo >= ERR_MAX))
  46.       MessageBox(NULL, "Undefined Error!", NULL, MB_OK | MB_ICONHAND);
  47.    else
  48.       MessageBox(NULL, szErrors[ErrNo], NULL, MB_OK | MB_ICONHAND);
  49. }
  50.